home *** CD-ROM | disk | FTP | other *** search
/ Dark Star 2 / Dark_Star_02_1995_-_de_Side_B.d64 / bio warefare (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  6KB  |  212 lines

  1. 100 goto2000
  2. 110 ]re:]li 1:]sp 68:]pi 68:]kn 150,150
  3. 120 i=rnd(-rnd(0)):poke53272,21:poke53280,1:poke53281,9
  4. 140 t$=""
  5. 150 qp=197:qa=73
  6. 160 ig=160:vi=215:co=209:gi=170
  7. 170 goto1360
  8. 180 print"[147]";" how many islanders (<=100)?";:say"how many i landers."
  9. 185 gosub1720:np=val(z1$)
  10. 190 ifnp=0then180
  11. 200 ifnp>100thenprint"[145][145]";:goto180
  12. 210 print" how many infected at start?";:say"how many infeckted at the start."
  13. 215 gosub1720:ni=val(z1$)
  14. 220 ifni=0then210
  15. 230 ifni>npthenprint"[145][145]";:goto210
  16. 240 print" contagion time (days)?";:say"contaygen time in days."
  17. 245 gosub1720:ct=val(z1$)
  18. 250 ifct=0thenprint"[145][145]";:goto240
  19. 260 restore
  20. 270 print"[147][144]":poke53281,3:fori=1to18:readil,ir
  21. 280 forj=iltoir:pokej,ig:pokej+54272,9:next:next
  22. 290 print" [215]=uninfected   [209]=contagious   *=immune"
  23. 300 print"[144] contagion"
  24. 310 print" time "ct;
  25. 320 ifct>1thenprint" days":goto340
  26. 330 print" day"
  27. 340 rem
  28. 350 pokeqa+2,peek(qa):pokeqa+3,peek(qa+1):z9=fre(0)
  29. 360 dimpp(np),pg(np),dc(np),ni(50),im(50)
  30. 370 fori=1tonp:pg(i)=vi:next
  31. 380 fori=1toni:pg(i)=co:next
  32. 390 fori=1tonp:dc(i)=0:next
  33. 400 fori=1toni:dc(i)=ct:next
  34. 410 fori=1tonp
  35. 420 pp(i)=int(690*rnd(1)+1157):ifpeek(pp(i))<>igthen420
  36. 430 pokepp(i),pg(i):next
  37. 440 nd=0
  38. 450 im=0:print""tab(7)np-ni-im;tab(20)ni;tab(30)im
  39. 460 print" day";nd:nd$=str$(nd):say"day":saynd$
  40. 470 nd=nd+1:ni=0:im=0
  41. 480 fori=1tonp
  42. 490 rem
  43. 500 if(peek(pp(i))=co)and(pg(i)=vi)thendc(i)=ct
  44. 510 pg(i)=peek(pp(i))
  45. 520 onint(9*rnd(1)+1)gosub900,910,920,930,940,950,960,970,980
  46. 540 ifpg(i)=cothengosub1060
  47. 560 ifpg(i)=vithengosub1160
  48. 580 ifpg(i)=cothendc(i)=dc(i)-1
  49. 600 ifdc(i)<0thenpg(i)=gi:pokepp(i),gi
  50. 610 ifpeek(pp(i))=cothenni=ni+1
  51. 620 ifpeek(pp(i))=githenim=im+1
  52. 630 next
  53. 640 ifnd<=50thenni(nd)=ni:im(nd)=im
  54. 650 print""tab(7)np-ni-im"[157]  ";tab(20)ni"[157]  ";tab(30)im"[157]  "
  55. 660 ifni>0then460
  56. 670 print" ";t$;:gosub1250
  57. 680 printchr$(147)"[144] day"tab(5)"infection":print:say"heers the bar charts."
  58. 690 fornd=1to50
  59. 700 forwt=1to150:next
  60. 710 print" ";nd;tab(4);
  61. 720 print" ";np-ni(nd)-im(nd);"";ni(nd);"";im(nd):print
  62. 730 ifnp-ni(nd)-im(nd)=0then750
  63. 740 fori=1tonp-ni(nd)-im(nd):print"[215]";:next
  64. 750 ifni(nd)=0then770
  65. 760 fori=1toni(nd):print"[209]";:next
  66. 770 ifim(nd)=0then790
  67. 780 fori=1toim(nd):print"*";:next
  68. 790 print"[144]":forx=1to1000:next
  69. 800 ifni(nd)=0then820
  70. 810 print:nextnd
  71. 820 print" like to see the chart again (y/n)?";"[145]";
  72. 823 say"like to see the chart again"
  73. 825 gosub1720:q$=z1$
  74. 830 ifq$=""thenprint"[145][145]";:gosub820
  75. 840 ifleft$(q$,1)="y"thenpoke29,0:goto680
  76. 845 poke29,0
  77. 850 goto1900
  78. 900 mv=39:gosub1000:return
  79. 910 mv=40:gosub1000:return
  80. 920 mv=41:gosub1000:return
  81. 930 mv=-1:gosub1000:return
  82. 940 mv=0:gosub1000:return
  83. 950 mv=1:gosub1000:return
  84. 960 mv=-41:gosub1000:return
  85. 970 mv=-40:gosub1000:return
  86. 980 mv=-39:gosub1000:return
  87. 990 rem
  88. 1000 ifpeek(pp(i)+mv)<>igthenreturn
  89. 1010 pg(i)=peek(pp(i))
  90. 1020 pokepp(i),ig
  91. 1030 pp(i)=pp(i)+mv
  92. 1040 pokepp(i),pg(i):return
  93. 1050 rem
  94. 1060 ifpeek(pp(i)-41)=vithenpokepp(i)-41,co
  95. 1070 ifpeek(pp(i)-40)=vi then pokepp(i)-40,co
  96. 1080 ifpeek(pp(i)-39)=vi then pokepp(i)-39,co
  97. 1090 ifpeek(pp(i)- 1)=vi then pokepp(i)- 1,co
  98. 1100 ifpeek(pp(i)+ 1)=vi then pokepp(i)+ 1,co
  99. 1110 ifpeek(pp(i)+39)=vi then pokepp(i)+39,co
  100. 1120 ifpeek(pp(i)+40)=vithen pokepp(i)+40,co
  101. 1130 ifpeek(pp(i)+41)=vithen pokepp(i)+41,co
  102. 1140 return
  103. 1150 rem
  104. 1160 ifpeek(pp(i)-41)=cothenpokepp(i),co
  105. 1170 ifpeek(pp(i)-40)=cothen pokepp(i),co
  106. 1180 ifpeek(pp(i)-39)=cothenpokepp(i),co
  107. 1190 ifpeek(pp(i)- 1)=cothenpokepp(i),co
  108. 1200 ifpeek(pp(i)+ 1)=cothenpokepp(i),co
  109. 1210 ifpeek(pp(i)+39)=cothenpokepp(i),co
  110. 1220 ifpeek(pp(i)+40)=cothenpokepp(i),co
  111. 1230 ifpeek(pp(i)+41)=cothenpokepp(i),co
  112. 1240 return
  113. 1250 print"       press any key to continue [146]":say"press any key to cuntinue."
  114. 1260 getq$:ifq$=""then1260
  115. 1270 return
  116. 1360 print"[155][147]":fori=1024to1063:pokei,224:pokei+960,224:next
  117. 1365 fori=55296to55335:pokei,3:pokei+960,3:next
  118. 1370 fori=1064to1944step40:pokei,224:pokei+39,224:next
  119. 1375 fori=55336to56216step40:pokei,3:pokei+39,3:next
  120. 1380 print""
  121. 1385 printtab(8)"[167][163][205] "
  122. 1386 printtab(8)"[170] [206] "
  123. 1387 printtab(8)"[170] [205] [221] [207][208] [208][207] [207][208] [205][206] [221] [167][205] [165]"
  124. 1388 printtab(8)"[170][164][206] [221] [204][186] [167][165] [204][186] [206][205] [221] [167] [205][165]"
  125. 1390 rem
  126. 1400 print"[158]"
  127. 1410 print""tab(15)" epidemic [146]"
  128. 1420 rem
  129. 1430 printleft$(t$,20)tab(4);"do you need instructions (y/n)?";:poke29,0
  130. 1431 say"do you need instructions?":gosub1720:q$=z1$
  131. 1440 ifq$=""then1430
  132. 1450 ifleft$(q$,1)<>"y"thenpoke29,0:goto180
  133. 1460 poke29,0
  134. 1470 printchr$(147)" an epidemic has broken out on a small "
  135. 1480 print" island. the disease is not fatal, and"
  136. 1490 print" once contracted provides immunity for   life."
  137. 1491 say"an epidemic has broken out on a small i land."
  138. 1492 say"the disease is not faital and oncecontracted pro vi dsimunity for life."
  139. 1500 print:print" you are allowed to choose certain "
  140. 1510 print" initial conditions:":print:print
  141. 1512 say"you are aloued to choose certen initial conditions."
  142. 1513 printtab(5);"the island population"
  143. 1515 say"the i land population."
  144. 1520 print:printtab(5)"the number originally infected"
  145. 1525 say"the number originally infected."
  146. 1530 print:printtab(5)"the number of days for which the"
  147. 1540 printtab(5)"disease is contagious - this is"
  148. 1550 printtab(5)"also the duration of the disease."
  149. 1553 say"the number of days for which the disease is contaigous."
  150. 1555 say"this is also the duration of the disease."
  151. 1560 print:print:print" the islanders will move about randomly,"
  152. 1570 print"[145] infecting others if contagious.";
  153. 1575 say"the i landers will move about randomly.infecting others if contaigous."
  154. 1580 print" those   who are immune will not be infected. "
  155. 1585 say"those who are immune will not be infected. "
  156. 1590 print: gosub1250
  157. 1600 printchr$(147)"[158] this will continue until the disease    has run it's";
  158. 1610 print" course  (until there are   no more infected persons)."
  159. 1613 say"this will continue until the disease has run it's course."
  160. 1615 say"until there are no more infected persons."
  161. 1620 print:print" you will then be given a day-by-day     bar chart of the";
  162. 1630 print" history of the"
  163. 1640 print" epidemic, up to a maximum of 50 days."
  164. 1642 say"you will then be given a day by day bar chart"
  165. 1643 say"of the history of the epidemic."
  166. 1645 say"up to a maximum of fifty days."
  167. 1650 print:gosub1250
  168. 1660 goto180
  169. 1670 data1158,1167,1196,1211
  170. 1680 data1234,1222,1271,1296,1306,1339,1346,1379,1386,1418
  171. 1690 data1427,1459,1469,1500,1510,1541,1553,1581
  172. 1700 data1593,1618,1632,1654,1673,1693,1715,1731,1757,1771
  173. 1710 data1800,1812,1841,1848
  174. 1720 z$="":z1$=""
  175. 1730 print"[166][157]";:fori=1to50
  176. 1735 getz$:ifz$<>""then1760
  177. 1740 next:print" [157]";:fori=1to50
  178. 1750 getz$:ifz$<>""then1760
  179. 1755 next:goto1730
  180. 1760 ifz$<>chr$(20)then1810
  181. 1770 ifz$=""then1730
  182. 1780 zz=len(z1$):ifzz<1then1730
  183. 1790 z1$=left$(z1$,zz-1):poke29,0:print"[157]";
  184. 1800 goto1730
  185. 1810 ifz$=chr$(13)orz$=chr$(141)then1850
  186. 1820 printz$;
  187. 1830 z1$=z1$+z$
  188. 1840 goto1730
  189. 1850 fori=1to10:getz$:nexti
  190. 1860 print
  191. 1870 return
  192. 1900 poke720,8:poke739,49:poke744,57:poke749,48:poke754,48:poke759,13
  193. 1902 poke743,169:poke758,169:poke792,207:poke793,2
  194. 1905 poke53281,6:poke53280,6:print"[147] want another try? (y/n)":
  195. 1907 say"do you want another try professor?"
  196. 1910 getx$:ifx$=""then1910
  197. 1920 ifx$="n"then1940
  198. 1930 run
  199. 1940 x$="":print"[147] do you want to return to war games ?":poke29,0
  200. 1945 say"do you want to return to war games?"
  201. 1950 getx$:ifx$=""then1950
  202. 1960 ifx$="y"then1980
  203. 1970 print"[147] bye,bye":say"bye bye.":end
  204. 1980 print"[147]load";chr$(34);"war menu";chr$(34);",8,1"
  205. 1990 poke631,19:poke632,13:poke633,82:poke634,117:poke635,13:poke198,5:end
  206. 2000 poke720,8:poke739,49:poke744,57:poke749,48:poke754,48:poke759,13
  207. 2002 poke743,169:poke758,169:poke792,207:poke793,2:poke53281,6:poke53280,6
  208. 2005 ifpeek(49153)=187then2020
  209. 2010 print"[147]          loading sub programs [146]":load"sam",8,1
  210. 2020 poke52,125:poke54,125:poke56,125:sys38144
  211. 2030 goto110
  212.